package com.kude.manager;

import com.kude.dao.ArticleCategoryDAO;
import com.kude.entity.ArticleCategory;
import com.kude.util.BeanFactory;


public class ArticleCategoryManager extends AbstractManager<ArticleCategory,ArticleCategoryDAO>{
	ArticleCategoryDAO articleCategoryDAO;
	public ArticleCategoryManager() {
		this.tableName = ArticleCategory.TABLE_NAME;
	}

	public boolean isExist(ArticleCategory obj) throws OperException {
		if(obj == null) {
			throw new OperException("产品对象obj不能为空");
		}
		if(obj.getArticleCategoryId() == null) {
			return false;
		}
		if(dao.getById(obj.getArticleCategoryId()) == null) {
			return false;
		}
		return true;
	}
	
	public void setArticleCategoryDAO(ArticleCategoryDAO articleCategoryDAO) {
		this.dao = articleCategoryDAO;
	}

}
